﻿Imports System
Imports System.Web.UI
Imports System.Web.UI.WebControls
Namespace WESNet.AJAX.Controls.ImageEditor
    Public Class ImageEditorDesigner
        Inherits Design.ControlDesigner

        Public Overrides Function GetDesignTimeHtml() As String
            Dim c As ImageEditor = CType(Component, ImageEditor)
            Dim Controls As ControlCollection = c.Controls
            Dim w, h As Integer
            If c.Width = Unit.Empty Then
                w = c.CalcWidthFromPreviewSize()
            Else
                w = Convert.ToInt32(c.Width.Value)
            End If
            Return "<div id=""" & c.ID & """ style=""width: " & w.ToString & "px; height: " & h.ToString & "px; text-align: center; border: solid 1px black;"">" & c.ID & "</div>"
        End Function

    End Class

End Namespace

